import type { App } from 'vue'
import SvgIcon from './SvgIcon/Svg-index.vue'
// 从 @element-plus/icons-vue 中导入所有图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import Category from './Category/index.vue'

const allGlobalComponent = { SvgIcon,Category }

export default {
  install: (app: App) => {
    Object.keys(allGlobalComponent).forEach((key) => {
      app.component(key, (allGlobalComponent as any)[key])
    });
    // 注册所有图标
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component)
    }
  },
}
